//
//  NSDate+Helper.h
//  NJUSTHelper
//
//  Created by 郑越辉 on 2017/9/22.
//  Copyright © 2017年 njust. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSDate (Helper)
///比较世纪/年/月/周/天/小时 之差
///waring:一定要将大的放参数位置(date)
-(NSInteger) compsEraToDate:(NSDate *)date;
-(NSInteger) compsYearToDate:(NSDate *)date;
-(NSInteger) compsMonthToDate:(NSDate *)date;
-(NSInteger) compsWeekToDate:(NSDate *)date;
-(NSInteger) compsDayToDate:(NSDate *)date;
-(NSInteger) compsHourToDate:(NSDate *)date;
-(NSInteger) compsMinuteToDate:(NSDate *)date;
-(NSInteger) compsSecondToDate:(NSDate *)date;



///获取self时间这周的周一
-(NSDate *)getMondayThisWeek;
///获取周几的index 周一-周日 : 0-6
-(NSInteger) getWeekIndex;
///日期向后几天, 负数表示向前
-(NSDate *) dayAfterDays:(NSInteger) days ;
///日期向前几天, 负数表示向后
-(NSDate *) dayBeforeDays:(NSInteger) days ;
///获取学期的第一天(周一 早上6点)
+(NSDate *) getFirstDay ;
///获取今天12点
+(NSDate *) getTodayNoonDate;
@end
